import Cookies from 'js-cookie'

const TokenKey = 'vue_admin_template_token'
const USER = 'user'
export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}
export function setUser(user){
  return Cookies.set(USER, user)
}
export function getUser(){
  return Cookies.get(USER)
}
export function removeAll() {
   Cookies.remove(USER)
   Cookies.remove(TokenKey)
   return
}
export function removeToken() {
  return Cookies.remove(TokenKey)
}
